import React, { Component } from 'react';
import { StyleSheet, Text, TouchableOpacity } from 'react-native';
import { style } from '../../../../../../theme/style';
import { GLOBAL } from '../../../../../../config/global';

const scale = GLOBAL.SCALE;
export class ShortButton extends Component {
	constructor(props) {
		super(props);
		this.state = {
		}
	}

	render () {
		let { btnText, onPress } = this.props || {};
		return (
			<TouchableOpacity style={styles.btn} onPress={() => onPress && onPress()}>
				<Text style={styles.btnText}>{btnText}</Text>
			</TouchableOpacity>
		)
	}
}

const styles = StyleSheet.create({
	btn: {
		backgroundColor: style.color.themeColor,
		width: 80 * scale,
		paddingTop: 10 * scale,
		paddingBottom: 10 * scale,
		borderRadius: 14 * scale,
		position: 'absolute',
		bottom: 30 * scale,
	},
	btnText: {
		color: '#fff',
		textAlign: 'center',
		fontSize: 14 * scale,
		fontWeight: 'bold'
	},
})